<div class="row-fluid" style="margin-bottom: 10px;">
    <div class="span12">
        <div class="box">
            <div class="tab-header">
                <i class="icon-file" style="margin-left: 10px;"></i><?=lang('label_view')?></div>

            <div class="padded" id="action_load_mudle">
                <!-- action contant  -->
                <h4><?= $result->title ?></h4>
 <?
                        if ( $result->create_date != '') {
                            echo $result->create_date;
                        }
                        ?>



                <?
                $result_type = array('' => lang('label_unknow'), '1' => lang('label_new'), '2' =>  lang('label_used'), '3' => lang('label_refurbed'))
                ?>
       

                <ul id="listview" <? if(!empty($result->file)){ ?> style="background-image:url('<?=display_img(PRODUCT_PATH, $result->file)?>');background-repeat: no-repeat;background-position:top left;" <? }  ?>>

                    <li>
                        <span class="details_item"><?=lang('label_quantity')?> </span>

                        <?
                        if ($result->quantity != '') {
                            echo $result->quantity;
                        }
                        ?>

                        <? if ($result->battery == 'YES') { ?><span class="battery"><?=lang('label_battery')?></span> <? } ?>
                        <? if ($result->perfum == 'YES') { ?><span class="perfum"><?=lang('label_perfum')?></span> <? } ?></li>

                    <li>
                        <span class="details_item"><?=lang('label_link')?> </span>
                        <? if ($result->link != '') { ?> 

                            <a href="<?= $result->link ?>" target="_blank" ><?=lang('label_Link_view')?></a> 

                        <? } ?>  

                    </li>
                    <li><span class="details_item">{<?=lang('label_item_number')?>} </span>
                        <?
                        if ( $result->item_number != '') {
                            echo  $result->item_number;
                        }
                        ?>
                    </li>
                    
                    
                    
                    <li>
                        <span class="details_item"><?=lang('label_price')?></span>
                        <?
                        if ($result->price != '') {
                            echo $result->price;
                        }
                        ?> <?=lang('label_dolar')?>
                    </li>
                    <li>
                        <span class="details_item"><?=lang('label_weight')?> </span>
                        <?
                        if ($result->weight != '') {
                            echo $result->weight;
                        }
                        ?><?=lang('label_lbs')?>
                    </li>
                    <li>
                        <span class="details_item"><?=lang('label_shiping_cost')?> </span>
                        <?
                        if ($result->shiping_cost != '') {
                            echo $result->shiping_cost;
                        }
                        ?><?=lang('label_dolar')?>
                    </li>
                    <li>
                        <span class="details_item"><?=lang('label_size')?> </span>
                        <?
                        if ($result->size != '') {
                            echo $result->size;
                        }
                        ?>  
                    </li>
                    <li>
                        <span class="details_item"><?=lang('label_color')?> </span>
                        <?
                        if ($result->color != '') {
                            echo $result->color;
                        }
                        ?>
                    </li>
                    <li>
                        <span class="details_item"><?=lang('label_item_type')?> </span>
                        <?
                        if ($result->item_type != '') {
                            echo $result_type[$result->item_type];
                        }
                        ?>
                    </li>
                    <li>
                        <span class="details_item"><?=lang('label_details')?> </span>
                        <p style="padding-right: 140px;float: right;">
                        <?
                        if ($result->details != '') {
                            echo $result->details;
                        }
                        ?>
                            </p>

                    </li>

                </ul>

                <div class="tool">
                    <a class="button blue" href="<?=base_url().get_segment(1)?>/<?=get_segment(2)?>/edit/<?=$result->id?>" style="margin-left:20px;"><i class="icon-pencil"></i>&nbsp;&nbsp;&nbsp;<?=lang('label_edit')?></a>
                    <a class="delete_confirm button red" href="<?=base_url().get_segment(1)?>/<?=get_segment(3)?>/delete/<?=$result->id?>"><i class="icon-trash"></i>&nbsp;&nbsp;&nbsp;<?=lang('label_delete')?></a>
                </div>

            </div>
        </div>
    </div>
</div>

<div class="row-fluid"  style="margin-bottom: 20px;">
    <div class="span12">
        <table class="table table-striped table-bordered box">
                                             <thead>
                                                 <tr>
                                                     <th colspan="4"> <i class="icon-book" style="margin-left: 10px;"></i>   <?=lang('label_bill_history')?></th>
                                                 </tr>
                                             </thead>
                                             <tbody>
                                                 <?
                                                 $r = 0;
                                                 if (is_array($histroy)) {


                                                     foreach ($histroy as $val) {
                                                         $r++;
                                                         ?>
                                                         <tr>
                                                             <td style="width: 20%;"> <?= timespan($val->create_date, time()); ?></td>
                                                             <td><strong><?= $val->title ?></strong>
                                                                 <strong style="display: block;color: green"><?= $val->note ?></strong>
                                                             </td>
                                                             <td><? if (!empty($val->company)) { ?> <a href="<?= get_shiping_company($val->company, 'link') ?>" target="_blank"><?= $val->track ?></a>  <? } ?></td>
                                                             <td><?= $val->username ?></td>
                                                         </tr>

                                                     <?
                                                     }
                                                 }
                                                 ?>

                                             </tbody>

                                         </table>

        </div> </div>